const tools = require('../util/jwt')
import {expfn} from "../util/status"

export default () => async (ctx, next) => {
  try {
    const token = ctx.headers.authorization
    console.log(token)
    const result = await tools.verToken(token);
    await next();
  } catch (error) {
    ctx.body = expfn({})
  }
};
